package com.woniu.microworkorderserver.businessmag.controller;

import com.woniu.microcommonsserver.entity.InspectPointInfoEntity;
import com.woniu.microcommonsserver.param.ResponseMsg;
import com.woniu.microworkorderserver.businessmag.mapper.InspectPointMapper;
import com.woniu.microworkorderserver.businessmag.service.InspectPointService;
import com.woniu.microworkorderserver.param.InspectPointMap;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/inspectPoint")
public class InspectPointController {

    @Resource
    private InspectPointService inspectPointServiceImpl;

    @GetMapping(value = "/findByPlanId",produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseMsg findByPlanId(long inspectPlanId){
        InspectPointMap map = inspectPointServiceImpl.findByPlanId(inspectPlanId);
        System.out.println(map);
        return ResponseMsg.builder().code(200).msg("查询成功").data(map).build();
    }
}
